home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
macdrivermuseum.net
/
www.macdrivermuseum.net.tar
/
www.macdrivermuseum.net
/
cdt.hqx
/
CDT Folder
/
Audio
/
PlayCD
/
background_2644.txt
< prev
next >
Wrap
Text File
|
1990-09-19
|
19KB
|
796 lines
-- background: 2644 from stack: in
-- bmap block id: 3159
-- flags: 0000
-- background id: 0
-- name:
----- HyperTalk script -----
on arrowKey direction
global gJukeList,gUp2Bat,gPorts
lock screen
put bg fld Port into lastID
put (lastID+2) into i
-- set i to line after Port+1 (port range is 0-6)
if direction = "right" then
repeat until line i of gPorts <> ""
set cursor to busy
add 1 to i
if i = 8 then put 1 into i --(gPorts has 7 lines)
if i = (lastID+1) then exit repeat
end repeat
end if
if direction = "left" then
repeat until line i of gPorts <> ""
set cursor to busy
subtract 1 from i
if i = 0 then put 7 into i --(gPorts has 7 lines)
if i = (lastID+1) then exit repeat
end repeat
end if
--if there are no other discs around, go to the blank disc card
if i = lastID then go cd 1
else find line i of gPorts in bg fld discID
set cursor to hand
if direction = "down" then
put line 1 of gJukeList &return after gJukeList
delete line 1 of gJukeList
put "" into gJukes
repeat with i = 1 to number of lines in gJukelist
put item 4 of line i of gJukelist&return after gJukes
end repeat
put gJukes into bg fld JukeList
end if
if direction = "up" then
put last line of gJukeList &return before gJukeList
delete last line of gJukeList
put "" into gJukes
repeat with i = 1 to number of lines in gJukelist
put item 4 of line i of gJukelist&return after gJukes
end repeat
put gJukes into bg fld JukeList
end if
put item 4 of line 1 of gJukeList into gUp2Bat
unlock screen
idle
end arrowKey
on idle
global gMarquee,gJukeList, gJukes,lastticks,gPlay,pFlag,gDisc, gcurrenttrack
--Maintain the Disc and JukeBox switches
if gJukeList = "" then
set hilite of bg btn "Play Disc" to true
put "D" into gPlay
set hilite of bg btn "Play List" to False
if bg fld JukeList <> "(No Tracks Installed)" then
lock screen
put "(No Tracks Installed)" into bg fld JukeList
unlock screen
end if
else
if gJukes <> bg fld JukeList then
lock screen
put "" into gJukes
repeat with i = 1 to number of lines in gJukelist
put item 4 of line i of gJukelist&return after gJukes
end repeat
put gJukes into bg fld JukeList
unlock screen
end if
end if
if pFlag = 1 then
cdopen (item 1 of gcurrenttrack)
--look for Jukebox between tracks.
if gPlay = "J" then
if pFlag = 1 and CDStatus() <> 1 then
send mouseup to bg btn "Play" --play the next jukebox track
end if
else
--otherwise, this is Disc mode, so, maintain the Marquee
--if the Marquee doesn't show the current track name, update it.
if line (item 1 of cdtrack()) of gDisc <> gMarquee then
put line (item 1 of cdtrack()) of gDisc into gMarquee
put gMarquee into bg fld Marquee
end if
if cdstatus() = 0 then
set hilite of bg btn "Play" to "False"
put 0 into pFlag
put "" into gMarquee
put "" into bg fld Marquee
end if
end if
end if
if (the ticks - lastticks) > 60 then
put the ticks into lastticks
end if
pass idle
end idle
on installTrack tracknum
global gJukeList, gJukes
put bg fld Port &","&","& tracknum&","& line tracknum of bg fld TrackList&return after gJukeList
put item 4 of last line of gJukelist&return after gJukes
put gJukes into bg fld JukeList
end installTrack
on openCard
global gPlay,gMarquee,gJukes
lock screen
--Fix the scrolls of the fields
set scroll of fld PhonyScroll to 0
send mouseWithin to fld PhonyScroll
if gPlay = "D" then send mouseUp to bg btn "Play Disc"
if gPlay = "J" then send mouseUp to bg btn "Play List"
put gMarquee into bg fld Marquee
if gJukes <> "" then
put gJukes into bg fld JukeList
else
put "(No Tracks Installed)" into bg fld JukeList
end if
unlock screen
end opencard
-- part 123 (field)
-- low flags: 01
-- high flags: 4007
-- rect: left=257 top=162 right=306 bottom=504
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: JukeList
-- part 86 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=9 top=141 right=158 bottom=32
-- title width / last selected line: 0
-- icon id / first selected line: 15420 / 15420
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Last
----- HyperTalk script -----
on mouseUp
arrowKey left
end mouseUp
-- part 59 (field)
-- low flags: 00
-- high flags: 0002
-- rect: left=9 top=179 right=199 bottom=247
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 12
-- style flags: 256
-- line height: 16
-- part name: Title
-- part 56 (field)
-- low flags: 00
-- high flags: 0002
-- rect: left=9 top=162 right=180 bottom=247
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 12
-- style flags: 256
-- line height: 16
-- part name: Artist
-- part 84 (field)
-- low flags: 81
-- high flags: 0002
-- rect: left=431 top=11 right=26 bottom=496
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: discID
-- part 102 (field)
-- low flags: 01
-- high flags: 4007
-- rect: left=9 top=198 right=306 bottom=42
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: Trackschecked
----- HyperTalk script -----
on mouseUp
send mouseUp to fld tracklist
end mouseUp
on mouseDown
send mouseDown to fld tracklist
end mouseDown
-- part 103 (field)
-- low flags: 00
-- high flags: 4007
-- rect: left=24 top=198 right=306 bottom=247
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: TrackList
----- HyperTalk script -----
on mouseDown
global startClick
put item 2 of the clickLoc into startClick
end mouseDown
on mouseUp
global startClick,scrollPos
--assumptions: top of jukelist = 198, jukelist font lineheight = 12
put item 2 of the mouseLoc into endClick
put (startClick-186+scrollPos) div 12 into startClick
put (endClick-186+scrollPos) div 12 into endClick
if endClick < startClick then
put endClick into temp
put startClick into endClick
put temp into startClick
end if
put number of lines in fld tracklist into a
if startClick <= a then
if endClick > a then put a into endClick
if endClick = startClick then
if line endClick of fld trackschecked = "‚àö" then
put " " into line endClick of fld trackschecked
else
put "‚àö" into line endClick of fld trackschecked
end if
else
repeat with i = startClick to endClick
if the optionKey is down then put " " into line i of fld trackschecked
else put "‚àö" into line i of fld trackschecked
end repeat
end if
end if
end mouseUp
-- part 138 (field)
-- low flags: 01
-- high flags: 0007
-- rect: left=230 top=198 right=306 bottom=247
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: PhonyScroll
----- HyperTalk script -----
on mouseWithin
global ScrollPos
put scroll of me into sp
if sp <> ScrollPos then
lock screen
put sp into ScrollPos
set the scroll of bg fld TrackList to ScrollPos
set the scroll of bg fld TracksChecked to ScrollPos
unlock screen
end if
end mouseWithin
on mouseLeave
send mouseWithin to me
end mouseLeave
-- part 105 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=8 top=316 right=333 bottom=164
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Install Selected Tracks
----- HyperTalk script -----
on mouseUp
repeat with i=1 to number of lines in fld TrackList
if line i of bg fld TracksChecked = "‚àö" then
installTrack i
put "" into line i of fld TracksChecked
end if
end repeat
end mouseUp
-- part 107 (button)
-- low flags: 00
-- high flags: A000
-- rect: left=362 top=38 right=84 bottom=396
-- title width / last selected line: 0
-- icon id / first selected line: 28840 / 28840
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: FF
----- HyperTalk script -----
on mousedown
global pFlag,gPlay, gcurrenttrack
if gPlay = "D" then
cdopen (bg fld Port) --address the current disc
else
cdopen (item 1 of gcurrenttrack) --address the current jukebox disc
end if
get CDElapsed()
CDScan 0, item 2 of it, item 3 of it, item 4 of it
end mousedown
on mouseup
global pflag
if pflag = 1 then
CDPlay
else
if pFlag =0 then CDPause
else CDStop
end if
end mouseup
-- part 108 (button)
-- low flags: 00
-- high flags: A000
-- rect: left=362 top=88 right=134 bottom=396
-- title width / last selected line: 0
-- icon id / first selected line: 10006 / 10006
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Pause
----- HyperTalk script -----
on mouseUp
global pFlag, gcurrentTrack,gPlay
if gPlay = "D" then
cdopen (bg fld Port) --address the current disc
else
cdopen (item 1 of gcurrenttrack) --address the current jukebox disc
end if
cdPause
put CDStatus() into pFlag
if pFlag = 0 then set hilite of me to "true"
end mouseUp
-- part 109 (button)
-- low flags: 00
-- high flags: A000
-- rect: left=312 top=38 right=84 bottom=346
-- title width / last selected line: 0
-- icon id / first selected line: 5566 / 5566
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Play
----- HyperTalk script -----
on mouseUp
global gJukeList, pFlag, gcurrentTrack,xxxcdrefnum,gMarquee,gPlay, gJukes,gDisc
set the hilite of me to "true"
if gPlay = "D" then
--if in Disc mode,
--find out if the current disc is playing.
cdopen bg fld Port
if CDStatus() <> 1 then
--if it's not, it should be.
--So turn off the current trck and get on with it.
cdopen item 1 of gcurrenttrack
cdstop
cdopen bg fld port
put bg fld Port into item 1 of gcurrenttrack
put 1 into item 3 of gcurrenttrack --start from track 1
put line 1 of bg fld trackList into item 4 of gcurrenttrack
put bg fld tracklist into gDisc
cdplay
else
--if it is playing, advance to the next track, stop playback,
-- and start playing the next track.
put 1 + item 1 of cdtrack() into item 3 of gcurrenttrack
put bg fld port into item 1 of gcurrenttrack
put line (item 3 of gcurrenttrack) of gDisc into item 4 of gcurrenttrack
cdstop
cdplaytrack (item 3 of gcurrenttrack)
end if
else --if in JukeBox Mode
--if playback is happening, stop the current track.
if pFlag = 1 then
cdopen item 1 of gcurrentTrack
cdstop
end if
lock screen
--get the next track ready
put line 1 of gJukeList into gcurrentTrack
--update the playlist
put line 1 of gJukeList&return after gJukeList
delete line 1 of gJukeList
--update the playlist names gobal+ display
put line 1 of gJukes&return after gJukes
delete line 1 of gJukes
put gJukes into bg fld JukeList
unlock screen
--play the next track
cdopen item 1 of gcurrentTrack
cdplay1 item 3 of gcurrentTrack
end if
--let everyone know that playback is happening.
put CDStatus() into pFlag
put item 4 of gcurrenttrack into gMarquee
put gMarquee into bg fld Marquee
end mouseUp
-- part 110 (button)
-- low flags: 00
-- high flags: A000
-- rect: left=312 top=88 right=134 bottom=346
-- title width / last selected line: 0
-- icon id / first selected line: 16441 / 16441
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Stop
----- HyperTalk script -----
on mouseUp
global pFlag, gcurrentTrack,gPlay
set hilite of bg btn "Play" to "False"
if gPlay = "D" then
cdopen (bg fld Port) --address the current disc
else
cdopen (item 1 of gcurrenttrack) --address the current jukebox disc
end if
cdStop
put CDStatus() into pFlag
end mouseUp
-- part 111 (button)
-- low flags: 00
-- high flags: A000
-- rect: left=263 top=87 right=134 bottom=296
-- title width / last selected line: 0
-- icon id / first selected line: 16615 / 16615
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Eject
----- HyperTalk script -----
on mouseUp
global pFlag, gcurrentTrack
set hilite of bg btn "Play" to "False"
cdopen bg fld Port
CDEject
put CDStatus() into pFlag
handleEject (bg fld port)
arrowKey right,(bg fld port) --now that the disc is gone, don't look at it.
end mouseUp
-- part 113 (field)
-- low flags: 01
-- high flags: 0002
-- rect: left=175 top=7 right=31 bottom=504
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 14
-- style flags: 256
-- line height: 18
-- part name: Marquee
-- part 116 (field)
-- low flags: 81
-- high flags: 0002
-- rect: left=434 top=37 right=52 bottom=453
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: Port
-- part 120 (field)
-- low flags: 00
-- high flags: 0000
-- rect: left=461 top=321 right=339 bottom=508
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 9
-- style flags: 256
-- line height: 12
-- part name:
-- part 124 (field)
-- low flags: 81
-- high flags: 0002
-- rect: left=475 top=34 right=49 bottom=494
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: lun
-- part 126 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=348 top=316 right=333 bottom=504
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Clear Play List
----- HyperTalk script -----
on mouseUp
global gJukeList,gJukes
put "" into gJukeList
put "" into gJukes
put "(No Tracks Installed)" into bg fld JukeList
end mouseUp
-- part 128 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=223 top=141 right=158 bottom=246
-- title width / last selected line: 0
-- icon id / first selected line: 16560 / 16560
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Next
----- HyperTalk script -----
on mouseUp
arrowKey right
end mouseUp
-- part 106 (button)
-- low flags: 00
-- high flags: A000
-- rect: left=262 top=38 right=84 bottom=296
-- title width / last selected line: 0
-- icon id / first selected line: 26340 / 26340
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: RW
----- HyperTalk script -----
on mousedown
global pFlag,gPlay
if gPlay = "D" then
cdopen (bg fld Port) --address the current disc
else
cdopen (item 1 of gcurrenttrack) --address the current jukebox disc
end if
get CDElapsed()
CDScan 1, item 2 of it, item 3 of it, item 4 of it
end mousedown
on mouseup
global pflag
if pflag = 1 then
CDPlay
else
if pFlag =0 then CDPause
else CDStop
end if
end mouseup
-- part 132 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=440 top=93 right=119 bottom=468
-- title width / last selected line: 0
-- icon id / first selected line: 32462 / 32462
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Help
----- HyperTalk script -----
on mouseUp
lock screen
help
unlock screen
end mouseUp
-- part 135 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=179 top=316 right=333 bottom=335
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Install All Tracks
----- HyperTalk script -----
on mouseUp
repeat with i=1 to number of lines in fld TrackList
installTrack i
end repeat
end mouseUp
-- part 134 (button)
-- low flags: 00
-- high flags: A006
-- rect: left=412 top=56 right=75 bottom=502
-- title width / last selected line: 0
-- icon id / first selected line: 1015 / 1015
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Play List
----- HyperTalk script -----
on mouseUp
global gJukeList,gPlay
if gJukeList <> "" then
put "J" into gPlay
set hilite of bg btn "Play DIsc" to false
else
put "D" into gPlay
set hilite of bg btn "Play List" to false
set hilite of bg btn "Play DIsc" to true
end if
end mouseUp
-- part 133 (button)
-- low flags: 00
-- high flags: E006
-- rect: left=412 top=38 right=56 bottom=496
-- title width / last selected line: 0
-- icon id / first selected line: 1015 / 1015
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Play Disc
----- HyperTalk script -----
on mouseUp
global gJukeList,gPlay
set hilite of bg btn "Play List" to false
put "D" into gPlay
set hilite of bg btn "Play List" to false
set hilite of bg btn "Play Disc" to true
end mouseUp
-- part 130 (field)
-- low flags: 81
-- high flags: 2002
-- rect: left=4 top=3 right=338 bottom=506
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 24
-- style flags: 256
-- line height: 32
-- part name: Intro
----- HyperTalk script -----
on mouseUp
lock screen
hide fld Intro
hide fld IntroText
unlock screen
end mouseUp
-- part 131 (field)
-- low flags: 81
-- high flags: 2007
-- rect: left=14 top=44 right=330 bottom=497
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: Introtext
----- HyperTalk script -----
on mouseUp
lock screen
if number of this card <> 1 then put "" into bg fld introtext
hide bg fld Intro
hide bg fld Introtext
unlock screen
end mouseUp